In general, a bar code is formed with combined bars and spaces according to an appropriate rule to designate a predetermined numeric or character. Such bar codes are widely used as input means for computers because such bar code input means are cheaper and relatively highly reliable when compared with other ordinary input means.
Referring now to FIG. 1, there is shown a conventional bar code reader 10 including a scanner 11, a time measuring circuit 12, a comparator circuit 13, a data latching circuit 14 (shown within a dashed line rectangle), and a decoder 15. The scanner 11 is used to read a bar code placed in its view, and then to convert light and dark areas of the bar code into a representative high and low level, respectively, output electrical signal. The time measuring circuit 12 measures the duration of the time period of each of the high and low levels of the output electrical signal from the scanner 11, and generates an output timing signal t.sub.i representative of the length of each of the time periods. The time measuring circuit 12 also provides output timing signals to the data latching circuit 14 and to the decoder 15. The comparator circuit 13 compares each timing signal t.sub.i (i=1, 2, 3, . . . ) from the time measuring circuit 12 with a predetermined reference time period signal t.sub.TH. As a result of such comparison, the comparator circuit 13 generates a high level electrical output data signal only when the time signal t.sub.i is higher than the predetermined reference time period signal t.sub.TH, and generates a low level electrical output data signal when the time period signal t.sub.i is less than the predetermined reference time period signal t.sub.TH. The data latching circuit 14 latches (captures) the output data signals from the comparator circuit 13 in response to clock (timing) signals from the time measuring circuit 12. More particularly, the data latching circuit 14 is shown as including seven serially-connected registers 16 for sequentially shifting and storing the output data signals from the comparator circuit 13 through the serial registers 16. The decoder 15 decodes each output data signal from the data latching circuit 14 and generates a representative bar code reader 10 alphanumeric output signal.
Referring now to FIGS. 2 and 3, there are shown the sequence of operation for the bar code reader 10 of FIG. 1 for a particular bar code with and without, respectively, the presence of a noise component. In FIG. 2, at line (a), there is shown a typical bar code (NW-7) commonly used to designate the character numeric "1". This bar code is read by scanner 11 and quantized (or binary coded) to generate a rectangular wave output signal as shown in FIG. 2 at line (b). The time measuring circuit 12 is always reset at a time of change over from a high level to a low level, and vice versa, in the rectangular wave output signal. More particularly, the time measuring circuit 12 measures the duration (period) of time for each of the high and low levels of the rectangular wave output signal, and generates the representative time period output signal t.sub.1, t.sub.2, . . . ,t.sub.7, indicated in FIG. 2 at line (c) for each of the measured time periods.
Each of the representative time period output signals is then compared by the comparator circuit 13 with a predetermined reference time period signal t.sub.TH. The comparator circuit 13 generates a logic level "1"as an output signal when any one of the high or low level representative time period output signals t.sub.i is larger than the predetermined reference time period signal t.sub.TH, and generates a logic level "0" when any one of the high or low level representative time period output signals t.sub.i is smaller than the predetermined reference time period signal t.sub.TH. The resultant data output signals from comparator 13 for the bar code of FIG. 2, line (a) is "0000110" (as shown in FIG. 2, line (d)) which becomes latched (stored) in the latching circuit 14.
The decoder 15 includes a code look-up table (not shown) comprising a Read Only Memory (ROM) which is used to store a predetermined code pattern and alphanumeric for each of the separate bar codes. With reference to the arrangement of the "0's" and "1's" in the "0000110" data output signals from the latching circuit 14, a decision is made by decoder 15, from accessing its look-up table, that the data output signals designate the alphanumeric "1". The decoder 15 then converts the alphanumeric "1" to, for example, a corresponding ASCII code and generates a decoded output signal as shown in FIG. 2, line (e).
In the conventional bar code reader 10, the bar code may include a noise component due to contamination or the like. FIG. 3, line (a) shows the typical bar code (NW-7) used to designate character number "1", but it includes a noise component which is shown as a diagonal region. The rectangular wave output signal from the scanner 11 is as shown in FIG. 3, line (b). It is to be understood that noise components can be caused by signatures, stamps and marks which overlap the bar code. The time measuring circuit 12 and comparator circuit 13 then produces the resultant data output signals of "0000100" as shown in FIG. 3, line (d) which is latched in latching circuit 14. The next to last binary 0 is shown with a double underscore to indicate that it is different (incorrect) from the last binary 1 shown in FIG. 2, line (d). Decoder 15 receives these resultant data output signals from latching circuit 14 and finds that there is no code corresponding to the bit pattern "0000100" in its look-up table. Therefore, the decoding operation cannot be performed in the decoder 15, and the decoder 15 generates either a questionable "?" or no bar code reader 10 output signal. Depending on the degree of contamination, the resultant data output signals from the latching circuit 14 may be recognized as a different alphanumeric, and thereby be converted into a different ASCII code.
Furthermore, if a noise component (as a blot) is attached to the bar code read by the scanner 11, the output signals from the scanner 11 may constitute a phenomenon similar to that of an additional or excessive bar that is inserted into a space in the bar code. As a result, a bar code that is read subsequent to the bar code shown in FIG. 2, line (a) will be recognized as including part of the preceding latched bar code of FIG. 3, line (b). Thus, the subsequent bar code will also not be recognized correctly because it has been incorrectly decoded.
From the above, it can be seen that the quality of recognition of the bar codes is lowered in the conventional bar code reader 10 when a noise component is attached to the bar code being read. Therefore, the conventional bar code reader 10 cannot cope with a noise component generated while reading a bar code caused by contamination or the like.